#ifndef _PARTICLE_H_
#define _PARTICLE_H_

#include "position.h"
#include "velocity.h"
#include "params.h"

class Pso;


class Particle
{
  public:
    Particle(Pso *p_pso);
    ~Particle();
    void calculateFitness();
    double getFitness();
    const Velocity *getVelocity();
    const Position *getPosition();
    const Position *getBestPosition();
    void setPosition(const Position &p_position);
    void setVelocity(const Velocity &p_velocity);
    Particle &operator=(const Particle &p_particle);

  private:
    Pso *m_pso; // Pso we belong to.
    Position *m_current_position;
    Position *m_best_position;
    Velocity *m_velocity;
    double m_fitness;
    double m_best_fitness;
    bool m_calculated_fitness;
};

#endif /* _PARTICLE_H_ */
